<div class="theme">
  <div class="dropdown">
    <button class="dropdown-trigger navbar__slide-down" aria-label="Select Language Button" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
      {{ partial "svgs/etc/translate.svg" (dict "width" 22 "height" 22) }}      
    </button>
    <div class="dropdown-content">
      {{ $siteLanguages := .Site.Languages }}
      {{ $pageLang := .Page.Lang }}
      {{ range .Page.AllTranslations }}
        {{ $translation := . }}
        {{ range $siteLanguages }}
          {{ if eq $translation.Lang .Lang }}
          {{ $selected := false }}
            {{ if eq $pageLang .Lang }}
              {{ if .LanguageName }}
                <a href="{{ $translation.Permalink }}" data-lang="{{ .Lang }}" class="dropdown-item is-active">{{ .LanguageName }}</a>
              {{ end }}
            {{ else }}
              {{ if .LanguageName }}
                <a href="{{ $translation.Permalink }}" data-lang="{{ .Lang }}" class="dropdown-item">{{ .LanguageName }}</a>
              {{ end }}
            {{ end }}
          {{ end }}
        {{ end }}
      {{ end }}
    </div>
  </div>
</div>